aaa1 = []
aaa2 = []
aaa3 = []
file1 = open('m1_sorted.txt')
aaa1 = file1.readlines()
file2 = open('m2_reverse.txt')
aaa1 = file2.readlines()
file3 = open('m3_shuffle.txt')
aaa1 = file3.readlines()
import time
t_start1= time.time()
aaa4 = True
while aaa4 == True:
    for i in range(len(aaa1) - 1):
        if aaa1[i] > aaa1[i + 1]:
            aaa1[i], aaa1[i + 1] = aaa1[i + 1], aaa1[i]
            aaa4 = False
t_end1 = time.time()
print("m1_sorted", ((t_end1 - t_start1) * 1000), "milliseconds")
t_start2= time.time()
aaa5 = True
while aaa5 == True:
    for i in range(len(aaa2) - 1):
        if aaa2[i] > aaa2[i + 1]:
            aaa2[i], aaa2[i + 1] = aaa2[i + 1], aaa2[i]
            aaa5 = False
t_end2 = time.time()
print("m2_reverse", ((t_end2 - t_start2) * 1000), "milliseconds")
t_start3= time.time()
aaa6 = True
while aaa6 == True:
    for i in range(len(aaa3) - 1):
        if aaa3[i] > aaa3[i + 1]:
            aaa3[i], aaa3[i + 1] = aaa3[i + 1], aaa3[i]
            aaa6 = False
t_end3 = time.time()
print("m3_shuffle", ((t_end3 - t_start3) * 1000), "milliseconds")
